package com.hongye.why.base;

import android.text.TextUtils;

import com.hongye.why.base.net.RequestParams;

/**
 * 所有的请求参数放入此类中
 */
public class ParamsFactory {

    /**
     * 登录接口参数设置
     *
     * @param loginName
     * @param pwd
     * @param cid       手机设备id
     * @return
     */
    public static RequestParams getLoginParams(String loginName, String pwd, String cid) {
        RequestParams loginParams = new RequestParams("mobileapi/common/doLogin.json");
        loginParams.setParam("username", loginName);
        loginParams.setParam("pwd", pwd);
        loginParams.setParam("cid", cid);
        return loginParams;
    }

    public static RequestParams getUpdateParams(String versionCode) {
        RequestParams updateParams = new RequestParams("mobileapi/common/getVersionUpdate.json");
        updateParams.setParam("versioncode", versionCode);
        return updateParams;
    }

    //圈子 交流 列表
    public static RequestParams getCommunicationListParams(int pageNo) {
        RequestParams params = new RequestParams("mobileapi/basedata/getArticleList.json");
        params.setParam("pageNo", pageNo + "");
        params.setParam("pageSize", String.valueOf(20));
        return params;
    }

    //圈子 >信息广场 列表
    public static RequestParams getInformationListParams(int pageNo) {
        RequestParams params = new RequestParams("mobileapi/basedata/getInformationList.json");
        params.setParam("pageNo", pageNo + "");
        params.setParam("pageSize", String.valueOf(20));
        return params;
    }

    //获取所有资讯的分类
    public static RequestParams getAllNewsChannelsParams() {
        RequestParams params = new RequestParams("mobileapi/cms/getAllNewsChannels.json");
        return params;
    }

    //获取资讯分类列表
    public static RequestParams getNewsByChannelIdParams(int id, int pageNo) {
        RequestParams params = new RequestParams("mobileapi/cms/getNewsByChannelId.json");
        params.setParam("id", id + "");
        params.setParam("pageNo", pageNo + "");
        params.setParam("pageSize", String.valueOf(20));
        return params;
    }

    //获取资讯详情
    public static RequestParams getNewsDetailParams(int id) {
        RequestParams params = new RequestParams("mobileapi/cms/getNewsDetail.json");
        params.setParam("id", String.valueOf(id));
        return params;
    }        //圈子->交流->详情页

    public static RequestParams getCommunicationDetailParams(int id) {
        RequestParams params = new RequestParams("mobileapi/basedata/getCommunicationDetail.json");
        params.setParam("id", id + "");
        return params;
    }

    //获取七牛上传key
    public static RequestParams getUploadTokenParams() {
        RequestParams params = new RequestParams("mobileapi/qiniu/getUploadToken.json");
        return params;
    }

    //发布圈子文章
    public static RequestParams publishArticleParams(String corpsCode, String content, String imgs, double longitude, double latitude, String expertId) {
        RequestParams params = new RequestParams("mobileapi/basedata/publishArticle.json");
        params.setParam("corpsCode", corpsCode);
        params.setParam("content", content);
        params.setParam("imgs", imgs);
        params.setParam("longitude", longitude + "");
        params.setParam("latitude", latitude + "");
        if (!TextUtils.isEmpty(expertId)) {
            params.setParam("expertId", expertId);
        }
        return params;
    }

    //获取农工列表接口
    public static RequestParams getLaborRequirementsListParams(int pageNo, String type) {
        RequestParams params = new RequestParams("mobileapi/basedata/getLaborRequirementsList.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(10));
        params.setParam("type", type);
        return params;
    }

    //获取农机列表接口
    public static RequestParams getMachineRequirementsListParams(int pageNo, String type) {
        RequestParams params = new RequestParams("mobileapi/basedata/getMachineRequirementsList.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(10));
        params.setParam("type", type);
        return params;
    }

    /**
     * 获取我的页面中的各个消息个数的接口
     *
     * @return RequestParams
     */
    public static RequestParams getPersonInfo() {
        RequestParams params = new RequestParams("mobileapi/basedata/getPersonInfo.json");
        return params;
    }

    /**
     * 上传头像接口
     *
     * @param url 七牛保存的头像url
     * @return RequestParams
     */
    public static RequestParams uploadHeadImgUrl(String url) {
        RequestParams params = new RequestParams("mobileapi/basedata/updateHeadImgUrl.json");
        params.setParam("fileName", url);
        return params;
    }

    /**
     * 获取个人档案
     *
     * @return
     */
    public static RequestParams getProfile() {
        RequestParams params = new RequestParams("mobileapi/basedata/getProfile.json");
        return params;
    }

    /**
     * 修改档案资料
     * @param name 姓名
     * @param telPhone 联系电话
     * @param address 地址
     * @param cropName 主要作物
     * @param plantArea 种植规模
     * @param output 年产量
     * @return
     */
    public static RequestParams updateArchiveInfo(String name, String telPhone, String address, String cropName, String plantArea, String output) {
        RequestParams params = new RequestParams("mobileapi/basedata/updateArchiveInfo.json");
        params.setParam("name", name);
        params.setParam("telPhone", telPhone);
        params.setParam("address", address);
        params.setParam("cropName", cropName);
        params.setParam("plantArea", plantArea);
        params.setParam("output", output);
        return params;
    }

    //收藏资讯
    public static RequestParams doFavNewsParams(int newsId) {
        RequestParams params = new RequestParams("mobileapi/cms/doFavNews.json");
        params.setParam("newsId", String.valueOf(newsId));
        return params;
    }

    //  移除收藏资讯
    public static RequestParams removeFavNewsByNewsIdParams(int newsId) {
        RequestParams params = new RequestParams("mobileapi/cms/removeFavNewsByNewsId.json");
        params.setParam("newsId", String.valueOf(newsId));
        return params;
    }

    //  资讯点赞
    public static RequestParams doLikeNewsParams(int newsId) {
        RequestParams params = new RequestParams("mobileapi/cms/doLikeNews.json");
        params.setParam("newsId", String.valueOf(newsId));
        return params;
    }

    //  文章点赞
    public static RequestParams likeArticleParams(int id) {
        RequestParams params = new RequestParams("mobileapi/basedata/likeArticle.json");
        params.setParam("id", String.valueOf(id));
        return params;
    }

    //  点赞评论
    public static RequestParams likeArticleCommentParams(int commentId) {
        RequestParams params = new RequestParams("mobileapi/basedata/likeArticleComment.json");
        params.setParam("commentId", String.valueOf(commentId));
        return params;
    }

    //  点赞取消评论
    public static RequestParams unlikeArticleCommentParams(int commentId) {
        RequestParams params = new RequestParams("mobileapi/basedata/unlikeArticleComment.json");
        params.setParam("commentId", String.valueOf(commentId));
        return params;
    }


    //  文章取消点赞
    public static RequestParams unlikeArticleParams(int id) {
        RequestParams params = new RequestParams("mobileapi/basedata/unlikeArticle.json");
        params.setParam("id", String.valueOf(id));
        return params;
    }

    //  资讯取消点赞
    public static RequestParams unLikeNewsByNewsIdParams(int newsId) {
        RequestParams params = new RequestParams("mobileapi/cms/unLikeNewsByNewsId.json");
        params.setParam("newsId", String.valueOf(newsId));
        return params;
    }


    //  发布农工需求订单
    public static RequestParams publishLaborRequirementParams(String content, String workaddress, String requireCount,
                                                              String worktime, String workPeriod, String contactTel, String price, String expireDays, String memo, String latitude, String longitude) {
        RequestParams params = new RequestParams("mobileapi/basedata/publishLaborRequirement.json");
        params.setParam("content", content);
        params.setParam("workaddress", workaddress);
        params.setParam("requireCount", requireCount);
        params.setParam("worktime", worktime);
        params.setParam("workPeriod", workPeriod);
        params.setParam("contactTel", contactTel);
        params.setParam("price", price);
        params.setParam("expireDays", expireDays);
        params.setParam("memo", memo);
        params.setParam("latitude", latitude);
        params.setParam("longitude", longitude);
        return params;
    }

    //  发布农机需求订单
    public static RequestParams publishMachineRequirementParams(String content, String workaddress, String requireCount,
                                                                String worktime, String workPeriod, String contactTel, String price, String expireDays, String memo, String latitude, String longitude, String machineCode) {
        RequestParams params = new RequestParams("mobileapi/basedata/publishMachineRequirement.json");
        params.setParam("content", content);
        params.setParam("workaddress", workaddress);
        params.setParam("requireCount", requireCount);
        params.setParam("worktime", worktime);
        params.setParam("workPeriod", workPeriod);
        params.setParam("contactTel", contactTel);
        params.setParam("price", price);
        params.setParam("expireDays", expireDays);
        params.setParam("memo", memo);
        params.setParam("latitude", latitude);
        params.setParam("longitude", longitude);
        params.setParam("machineCode", machineCode);
        return params;
    }

    //  接单（农工）
    public static RequestParams acceptLaborRequirementOrderParams(String requirementId) {
        RequestParams params = new RequestParams("mobileapi/basedata/acceptLaborRequirementOrder.json");
        params.setParam("requirementId", requirementId);
        return params;
    }


    //  接单（农机）
    public static RequestParams acceptMachineRequirementOrderParams(String requirementId) {
        RequestParams params = new RequestParams("mobileapi/basedata/acceptMachineRequirementOrder.json");
        params.setParam("requirementId", requirementId);
        return params;
    }

    // 取消农工需求订单
    public static RequestParams cancelLaborRequirementOrderParams(String requirementId, String reason) {
        RequestParams params = new RequestParams("mobileapi/basedata/cancelLaborRequirementOrder.json");
        params.setParam("requirementId", requirementId);
        params.setParam("reason", reason);
        return params;
    }

    /**
     * 个人档案编辑接口
     *
     * @param memberCount 家庭成员数量
     * @param houseArea   房产面积
     * @param fieldArea   种植面积
     * @param corpsCode   植物作物码
     * @return RequestParams
     */
    public static RequestParams editProfile(String memberCount, String houseArea, String fieldArea, String corpsCode) {
        RequestParams params = new RequestParams("mobileapi/basedata/editProfile.json");
        params.setParam("memberCount", memberCount);
        params.setParam("houseArea", houseArea);
        params.setParam("fieldArea", fieldArea);
        params.setParam("corpsCode", corpsCode);
        return params;
    }


    // 获取交流文章的评论列表
    public static RequestParams getArticleCommentListParams(int id, int pageNo) {
        RequestParams params = new RequestParams("mobileapi/basedata/getArticleCommentList.json");
        params.setParam("id", String.valueOf(id));
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(10));
        return params;
    }


    // 获取交流文章详情
    public static RequestParams getArticleDetailParams(int id) {
        RequestParams params = new RequestParams("mobileapi/basedata/getArticleDetail.json");
        params.setParam("id", String.valueOf(id));
        return params;
    }


    // 评论文章
    public static RequestParams commentArticleParams(int articleId, String comment) {
        RequestParams params = new RequestParams("mobileapi/basedata/commentArticle.json");
        params.setParam("articleId", String.valueOf(articleId));
        params.setParam("comment", comment);
        return params;
    }

    /**
     * 获取我关注的专家列表
     *
     * @param pageNo   当前页码
     * @param pageSize 每页数量 （10）
     * @return RequestParams
     */
    public static RequestParams getMyFocusExperts(String pageNo, String pageSize) {
        RequestParams params = new RequestParams("mobileapi/basedata/getMyFocusExperts.json");
        params.setParam("pageNo", pageNo);
        params.setParam("pageSize", pageSize);
        return params;
    }

    /**
     * 获取我的收藏列表
     *
     * @param page 当前页数
     * @return RequestParams
     */
    public static RequestParams getMyFavNews(String page) {
        RequestParams params = new RequestParams("mobileapi/cms/getMyFavNews.json");
        params.setParam("page", page);
        return params;
    }

    /**
     * 获取我当前的评论列表
     *
     * @return RequestParams
     */
    public static RequestParams getMyArticleCommentList(int pageNo, int pageSize) {
        RequestParams params = new RequestParams("mobileapi/basedata/getMyArticleCommentList.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(pageSize));
        return params;
    }

    /**
     * 首页
     *
     * @return
     */
    public static RequestParams getRecommendations() {
        return new RequestParams("mobileapi/basedata/getRecommendations.json");
    }


    /**
     * 获取所有学农技分类
     */
//    public static RequestParams getAllCatalogsParam() {
//        return new RequestParams("mobileapi/cms/getAllCatalogs.json");
//    }
    public static RequestParams getAllCatalogsParam() {
        return new RequestParams("mobileapi/cms/getAllSkillCatalogs.json");
    }

    /**
     * 获取学农技资讯列表
     */
    public static RequestParams getNewsByCatalogIdParam(String catalogCode, int pageNo) {
        RequestParams params = new RequestParams("mobileapi/cms/getNewsByCatalogId.json");
        params.setParam("catalogCode", catalogCode);
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(10));
        return params;
    }

    /**
     * 获取学农技专家列表
     */
    public static RequestParams getExpertsByCatalogParam(String catalogCode) {
        RequestParams params = new RequestParams("mobileapi/cms/getExpertsByCatalog.json");
        params.setParam("catalogCode", catalogCode);
        return params;
    }


    /**
     * 获取我的土地列表
     */
    public static RequestParams getMyCurrentPlants() {
        return new RequestParams("mobileapi/plant/getMyCurrentPlants.json");
    }

    /**
     * 获取我关注的消息（文章）列表
     *
     * @return RequestParams
     */
    public static RequestParams getMyFocusArticleList(int pageNo, int pageSize) {
        RequestParams params = new RequestParams("mobileapi/basedata/getMyFocusArticleList.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(pageSize));
        return params;
    }

    /**
     * 获取我关注的专家列表
     *
     * @return RequestParams
     */
    public static RequestParams getMyFocusExperts(int pageNo, int pageSize) {
        RequestParams params = new RequestParams("mobileapi/cms/getMyFocusExperts.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(pageSize));
        return params;
    }

    /**
     * 我的农机接单
     *
     * @param pageNo   当前请求页
     * @param pageSize 每页条目数
     * @return RequestParams
     */
    public static RequestParams getMyAcceptedMachineRequirements(int pageNo, int pageSize) {
        RequestParams params = new RequestParams("mobileapi/basedata/getMyAcceptedMachineRequirements.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(pageSize));
        return params;
    }

    /**
     * 我的农工接单
     *
     * @param pageNo   当前请求页
     * @param pageSize 每页条目数
     * @return RequestParams
     */
    public static RequestParams getMyAcceptedLaborRequirements(int pageNo, int pageSize) {
        RequestParams params = new RequestParams("mobileapi/basedata/getMyAcceptedLaborRequirements.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(pageSize));
        return params;
    }

    /**
     * 新建土地
     *
     * @param corpsCode
     * @param fieldArea
     * @param latitude
     * @param longitude
     * @return
     */
    public static RequestParams createPlant(String corpsCode, String fieldArea, String latitude, String longitude) {
        RequestParams params = new RequestParams("mobileapi/plant/createPlant.json");
        params.setParam("corpsCode", corpsCode);
        params.setParam("fieldArea", fieldArea);
        params.setParam("latitude", latitude);
        params.setParam("longitude", longitude);
        return params;
    }

    /**
     * 获取视频合集
     *
     * @param id id
     * @return RequestParams
     */
    public static RequestParams getCollectionItemsByDetail(int id) {
        RequestParams params = new RequestParams("mobileapi/cms/getCollectionItemsByDetail.json");
        params.setParam("id", String.valueOf(id));
        return params;
    }

    /**
     * 我的发布（圈子）
     *
     * @param pageNo   当前请求页
     * @param pageSize 每页条目数
     * @return RequestParams
     */
    public static RequestParams getMyArticleList(int pageNo, int pageSize) {
        RequestParams params = new RequestParams("mobileapi/basedata/getMyArticleList.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(pageSize));
        return params;
    }

    /**
     * 我的发布（农机）
     *
     * @param pageNo   当前请求页
     * @param pageSize 每页条目数
     * @return RequestParams
     */
    public static RequestParams getMyMachineRequirements(int pageNo, int pageSize) {
        RequestParams params = new RequestParams("mobileapi/basedata/getMyMachineRequirements.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(pageSize));
        return params;
    }

    /**
     * 我的发布（农工）
     *
     * @param pageNo   当前请求页
     * @param pageSize 每页条目数
     * @return RequestParams
     */
    public static RequestParams getMyLaborRequirements(int pageNo, int pageSize) {
        RequestParams params = new RequestParams("mobileapi/basedata/getMyLaborRequirements.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(pageSize));
        return params;
    }

    /**
     * 我的供销订单
     *
     * @param pageNo   当前请求页
     * @param pageSize 每页条目数
     * @return RequestParams
     */
    public static RequestParams getMyOrdersList(int pageNo, int pageSize) {
        RequestParams params = new RequestParams("mobileapi/basedata/getMyOrdersList.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(pageSize));
        return params;
    }

    /**
     * 获取供销订单详情
     * @param id 供销订单ID
     * @return
     */
    public static RequestParams getMarketOrderDetail(long id){
        RequestParams params = new RequestParams("mobileapi/basedata/getMarketOrderDetail.json");
        params.setParam("orderId", String.valueOf(id));
        return params;
    }

    /**
     * 取消供销订单
     * @param id 订单ID
     * @param reason 取消原因
     * @return
     */
    public static RequestParams cancelOrder(String id, String reason){
        RequestParams params = new RequestParams("mobileapi/basedata/cancelOrder.json");
        params.setParam("id",id);
        params.setParam("reason",reason);
        return params;
    }

    /**
     * 批量删除种植历史纪录
     * @param id 纪录id
     * @return RequestParams
     */
    public static RequestParams deleteOrderById(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/deleteSeedLog.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 获取供销订单生长环境
     * @param id
     * @return
     */
    public static RequestParams getAreaClimates(String id){
        RequestParams params = new RequestParams("mobileapi/basedata/getAreaClimates.json");
        params.setParam("id",id);
        return params;
    }

    /**
     * 获取专家详细信息
     *
     * @param id
     */
    public static RequestParams getExpertDetailById(String id) {
        RequestParams params = new RequestParams("mobileapi/cms/getExpertDetailById.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 批量删除我发布的圈子文章
     *
     * @param id 文章id - 多条以"," 分割 （id=4,5,6）
     * @return RequestParams
     */
    public static RequestParams deleteBatchArticle(String id) {
        RequestParams params = new RequestParams("mobileapi/basedata/deleteBatchArticle.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 批量删除我关注的圈子文章
     *
     * @param id 文章id - 多条以"," 分割 （id=4,5,6）
     * @return RequestParams
     */
    public static RequestParams unlikeBatchArticle(String id) {
        RequestParams params = new RequestParams("mobileapi/basedata/unlikeBatchArticle.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 删除我的圈子评论
     *
     * @param id 文章评论id
     * @return RequestParams
     */
    public static RequestParams deleteArticleComment(String id) {
        RequestParams params = new RequestParams("mobileapi/basedata/deleteBatchArticleComment.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 批量删除我收藏的资讯
     *
     * @param favId 我收藏的资讯
     * @return RequestParams
     */
    public static RequestParams removeFavNews(String favId) {
        RequestParams params = new RequestParams("mobileapi/cms/removeFavNews.json");
        params.setParam("favId", favId);
        return params;
    }

    /**
     * 批量删除我的发布（农机）
     *
     * @param requirementId 我的发布id
     * @return RequestParams
     */
    public static RequestParams deleteBatchMachineRequirementOrder(String requirementId) {
        RequestParams params = new RequestParams("mobileapi/basedata/deleteBatchMachineRequirementOrder.json");
        params.setParam("requirementId", requirementId);
        return params;
    }

    /**
     * 批量删除我的发布（农工）
     *
     * @param requirementId 我的发布id
     * @return RequestParams
     */
    public static RequestParams deleteBatchLaborRequirementOrder(String requirementId) {
        RequestParams params = new RequestParams("mobileapi/basedata/deleteBatchLaborRequirementOrder.json");
        params.setParam("requirementId", requirementId);
        return params;
    }

    /**
     * 批量删除我的供销订单
     *
     * @param id 我的供销订单id
     * @return RequestParams
     */
    public static RequestParams deleteOrder(String id, String reason) {
        RequestParams params = new RequestParams("mobileapi/basedata/deleteOrder.json");
        params.setParam("id", id);
        params.setParam("reason", reason);
        return params;
    }

    /**
     * 关注专家
     */
    public static RequestParams doLikeExpert(String expertId) {
        RequestParams params = new RequestParams("mobileapi/cms/doLikeExpert.json");
        params.setParam("expertId", expertId);
        return params;
    }


    /**
     * 取消关注专家
     */
    public static RequestParams doUnLikeExpert(String expertId) {
        RequestParams params = new RequestParams("mobileapi/cms/doUnLikeExpert.json");
        params.setParam("expertId", expertId);
        return params;
    }

    /**
     * 根据ID 获取模板
     *
     * @param id
     * @return
     */
    public static RequestParams getMyPlantById(int id) {
        RequestParams params = new RequestParams("mobileapi/plant/getMyPlantById.json");
        params.setParam("id", String.valueOf(id));
        return params;
    }

    /**
     * 开始土地
     *
     * @param id
     * @return
     */
    public static RequestParams startPlant(int id) {
        RequestParams params = new RequestParams("mobileapi/plant/startPlant.json");
        params.setParam("id", String.valueOf(id));
        return params;
    }

    /**
     * 停止土地
     *
     * @param id
     * @return
     */
    public static RequestParams endPlant(int id) {
        RequestParams params = new RequestParams("mobileapi/plant/endPlant.json");
        params.setParam("id", String.valueOf(id));
        return params;
    }

    /**
     * 获取字典
     *
     * @return
     */
    public static RequestParams getAllDics() {
        return new RequestParams("mobileapi/dict/getAllDics.json");
    }

    /**
     * 根据用户ID获取土地信息
     * @param id 用户ID
     * @return
     */
    public static RequestParams getLandDetailsByUser(String id){
        RequestParams params = new RequestParams("mobileapi/common/getLandDetailsByUser.json");
        params.setParam("id", String.valueOf(id));
        return params;
    }

    /**
     * 整地模板
     *
     * @param plantId
     * @param date
     * @param prePlant
     * @param resetType
     * @param resetBy
     * @param price
     * @return
     */
    public static RequestParams recordFieldResetTemplate(String plantId, String date, String prePlant, String resetType, String resetBy, String price, String weatherInfo) {
        RequestParams params = new RequestParams("mobileapi/plant/recordFieldResetTemplate.json");
        params.setParam("plantId", plantId);
        params.setParam("date", date);
        params.setParam("prePlant", prePlant);
        params.setParam("resetType", resetType);
        params.setParam("resetBy", resetBy);
        params.setParam("price", price);
        params.setParam("weatherInfo",weatherInfo);
        return params;
    }


    /**
     * 播种模板
     *
     * @param plantId
     * @param date
     * @param type
     * @param brand
     * @param mode
     * @param usage
     * @param price
     * @return
     */
    public static RequestParams recordSeedTemplate(String plantId, String date, String type, String brand, String mode, String usage, String price, String weatherInfo) {
        RequestParams params = new RequestParams("mobileapi/plant/recordSeedTemplate.json");
        params.setParam("plantId", plantId);
        params.setParam("date", date);
        params.setParam("type", type);
        params.setParam("brand", brand);
        params.setParam("mode", mode);
        params.setParam("usage", usage);
        params.setParam("price", price);
        params.setParam("weatherInfo", weatherInfo);
        return params;
    }

    /**
     * 灌溉模板
     *
     * @param plantId
     * @param date
     * @param type
     * @param source
     * @param price
     * @return
     */
    public static RequestParams recordIrrigationTemplate(String plantId, String date, String type, String source, String price, String weatherInfo) {
        RequestParams params = new RequestParams("mobileapi/plant/recordIrrigationTemplate.json");
        params.setParam("plantId", plantId);
        params.setParam("date", date);
        params.setParam("type", type);
        params.setParam("source", source);
        params.setParam("price", price);
        params.setParam("weatherInfo", weatherInfo);
        return params;
    }

    /**
     * 施肥模板
     *
     * @param plantId
     * @param date
     * @param name    名称
     * @param usage   用量
     * @param type
     * @param price
     * @return
     */
    public static RequestParams recordFertilizeTemplate(String plantId, String date, String name, String usage, String type, String price, String weatherInfo) {
        RequestParams params = new RequestParams("mobileapi/plant/recordFertilizeTemplate.json");
        params.setParam("plantId", plantId);
        params.setParam("date", date);
        params.setParam("type", type);
        params.setParam("name", name);
        params.setParam("usage", usage);
        params.setParam("price", price);
        params.setParam("weatherInfo", weatherInfo);
        return params;
    }

    /**
     * 打药模板
     *
     * @param plantId
     * @param date
     * @param name
     * @param usage
     * @param type
     * @param price
     * @return
     */
    public static RequestParams recordInsecticidalTemplate(String plantId, String date, String name, String usage, String type, String price, String weatherInfo) {
        RequestParams params = new RequestParams("mobileapi/plant/recordInsecticidalTemplate.json");
        params.setParam("plantId", plantId);
        params.setParam("date", date);
        params.setParam("type", type);
        params.setParam("name", name);
        params.setParam("usage", usage);
        params.setParam("price", price);
        params.setParam("weatherInfo", weatherInfo);
        return params;
    }

    /**
     * 采收模板
     *
     * @param plantId
     * @param date
     * @param type
     * @param output  产量
     * @param usefor  用途
     * @param price
     * @return
     */
    public static RequestParams recordHavestTemplate(String plantId, String date, String type, String output, String usefor, String price, String weatherInfo) {
        RequestParams params = new RequestParams("mobileapi/plant/recordHavestTemplate.json");
        params.setParam("plantId", plantId);
        params.setParam("date", date);
        params.setParam("type", type);
        params.setParam("output", output);
        params.setParam("usefor", usefor);
        params.setParam("price", price);
        params.setParam("weatherInfo", weatherInfo);
        return params;
    }

    /**
     * 根据种植ID 获取模板
     * @param plantId 种植ID
     * @return 可操作模板
     */
    public static RequestParams getFlowCfgListBySeedId(String plantId){
        RequestParams params = new RequestParams("mobileapi/plant/getFlowCfgListBySeedId.json");
        params.setParam("plantId",plantId);
        return params;
    }

    /**
     * 发布订单
     *
     * @param plantId
     * @param tel
     * @param address
     * @param ouputSum
     * @param saleSum
     * @param minPrice
     * @param maxPrice
     * @param marketPrice
     * @param longitude
     * @param latitude
     * @return
     */
    public static RequestParams publishOrder(String plantId, String tel, String address, String ouputSum, String saleSum, String minPrice, String maxPrice,
                                             String marketPrice, String longitude, String latitude, String contactPerson, String priceUnit) {
        RequestParams params = new RequestParams("mobileapi/basedata/publishOrder.json");
        params.setParam("plantId", plantId);
        params.setParam("tel", tel);
        params.setParam("address", address);
        params.setParam("ouputSum", ouputSum);
        params.setParam("saleSum", saleSum);
        params.setParam("minPrice", minPrice);
        params.setParam("maxPrice", maxPrice);
        params.setParam("marketPrice", marketPrice);
        params.setParam("longitude", longitude);
        params.setParam("latitude", latitude);
        params.setParam("contactPerson", contactPerson);
        params.setParam("priceUnit", priceUnit);
        return params;
    }

    /**
     * 添加模板
     *
     * @param plantId
     * @param code
     * @param orderNum
     * @return
     */
    public static RequestParams addPlantTemplate(String plantId, String code, String orderNum) {
        RequestParams params = new RequestParams("mobileapi/plant/addPlantTemplate.json");
        params.setParam("plantId", plantId);
        params.setParam("code", code);
        params.setParam("orderNum", orderNum);
        return params;
    }

    /**
     * 历史土地
     *
     * @param pageNo
     * @param pageSize
     * @return
     */
    public static RequestParams getMyHistoryPlants(Integer pageNo, Integer pageSize) {
        RequestParams params = new RequestParams("mobileapi/plant/getMyHistoryPlants.json");
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(pageSize));
        return params;
    }

    /**
     * 历史记录
     *
     * @param plantId
     * @param pageNo
     * @param pageSize
     * @return
     */
    public static RequestParams getHistoryByPlant(String plantId, Integer pageNo, Integer pageSize) {
        RequestParams params = new RequestParams("mobileapi/plant/getHistoryByPlant.json");
        params.setParam("plantId", plantId);
        params.setParam("pageNo", String.valueOf(pageNo));
        params.setParam("pageSize", String.valueOf(pageSize));
        return params;
    }

    /**
     * 删除模板
     *
     * @param plantId
     * @param code
     * @return
     */
    public static RequestParams deletePlantTemplate(String plantId, String code) {
        RequestParams params = new RequestParams("mobileapi/plant/deletePlantTemplate.json");
        params.setParam("plantId", plantId);
        params.setParam("code", code);
        return params;
    }

    /**
     * 获取种植的发布供销订单
     *
     * @param id
     * @return
     */
    public static RequestParams getMyMarketOrderBySeedId(String id) {
        RequestParams params = new RequestParams("mobileapi/basedata/getMyMarketOrderBySeedId.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 更新个人档案作物的
     *
     * @param id
     * @return
     */
    public static RequestParams updateMyPlant(String id) {
        RequestParams params = new RequestParams("mobileapi/basedata/updateProfile.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 提交意见反馈
     *
     * @param suggestion
     * @return
     */
    public static RequestParams commitSuggestion(String suggestion) {
        RequestParams params = new RequestParams("mobileapi/basedata/commitSuggestion.json");
        params.setParam("suggestion", suggestion);
        return params;
    }


    /**
     * 获取整地模板日志
     *
     * @param id
     * @return
     */
    public static RequestParams getFieldResetLog(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getFieldResetLog.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 获取播种模板日志
     *
     * @param id
     * @return
     */
    public static RequestParams getSeedLog(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getSeedLog.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 获取灌溉模板日志
     *
     * @param id
     * @return
     */
    public static RequestParams getIrrigationLog(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getIrrigationLog.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 获取施肥模板日志
     *
     * @param id
     * @return
     */
    public static RequestParams getFertilizeLog(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getFertilizeLog.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 获取打药模板日志
     *
     * @param id
     * @return
     */
    public static RequestParams getInsecticidalLog(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getInsecticidalLog.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 获取采收模板日志
     *
     * @param id
     * @return
     */
    public static RequestParams getHavestLog(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getHavestLog.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 添加食用菌栽培纪录
     * @param plantId  种植ID
     * @param material  原料
     * @param loadingMode  装料方式
     * @param location  放置位置
     * @param startTime  开始时间
     * @param elementExplain  成分说明
     * @param plantCost  费用
     * @param weatherInfo 天气信息
     * @return  添加成败
     */
    public static RequestParams addLogPlantRecord(String plantId, String material, String loadingMode, String location, String startTime, String elementExplain, String plantCost, String weatherInfo) {
        RequestParams params = new RequestParams("mobileapi/plant/addLogPlantRecord.json");
        params.setParam("plantId", plantId);
        params.setParam("material", material);
        params.setParam("loadingMode", loadingMode);
        params.setParam("location", location);
        params.setParam("startTime", startTime);
        params.setParam("elementExplain", elementExplain);
        params.setParam("plantCost", plantCost);
        params.setParam("weatherInfo", weatherInfo);
        return params;
    }

    /**
     * 获取食用菌栽培模板日志
     * @param id  种植ID
     * @return  栽培日志
     */
    public static RequestParams getLogPlantRecord(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getLogPlantRecord.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 添加食用菌播种纪录
     * @param plantId 种植ID
     * @param temperature 温度
     * @param humidity 湿度
     * @param sowTime 播种时间
     * @param fungusSowCost 费用
     * @return 添加成败
     */
    public static RequestParams addLogFungusSowRecord(String plantId, String temperature, String humidity, String sowTime, String fungusSowCost, String weatherInfo) {
        RequestParams params = new RequestParams("mobileapi/plant/addLogFungusSowRecord.json");
        params.setParam("plantId", plantId);
        params.setParam("temperature", temperature);
        params.setParam("humidity", humidity);
        params.setParam("sowTime", sowTime);
        params.setParam("fungusSowCost", fungusSowCost);
        params.setParam("weatherInfo", weatherInfo);
        return params;
    }

    /**
     * 获取食用菌播种模板日志
     * @param id  种植ID
     * @return  栽培日志
     */
    public static RequestParams getLogFungusSowRecord(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getLogFungusSowRecord.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 新增日志记录
     * @param seedId  种植ID
     * @param title 标题
     * @param type 类型
     * @param detailData 数据
     * @return 添加成败
     */
    public static RequestParams addSeedLog(String seedId, String title, String type, String detailData) {
        RequestParams params = new RequestParams("mobileapi/plant/addSeedLog.json");
        params.setParam("seedId", seedId);
        params.setParam("title", title);
        params.setParam("type", type);
        params.setParam("detailData", detailData);
        return params;
    }

    /**
     * 获取新增日志记录
     * @param id  种植ID
     * @return  记录数据
     */
    public static RequestParams getSeedLogDetail(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getSeedLogDetail.json");
        params.setParam("logId", id);
        return params;
    }



    /**
     * 添加食用菌发菌记录
     * @param plantId  种植ID
     * @param temperature 温度
     * @param humidity 湿度
     * @param startTime 发菌日期
     * @param period  时长
     * @param hairyFungusCost 费用
     * @return 添加成败
     */
    public static RequestParams addLogHairyFungusRecord(String plantId, String temperature, String humidity, String startTime, String period, String hairyFungusCost, String weatherInfo) {
        RequestParams params = new RequestParams("mobileapi/plant/addLogHairyFungusRecord.json");
        params.setParam("plantId", plantId);
        params.setParam("temperature", temperature);
        params.setParam("humidity", humidity);
        params.setParam("startTime", startTime);
        params.setParam("period", period);
        params.setParam("hairyFungusCost", hairyFungusCost);
        params.setParam("weatherInfo", weatherInfo);
        return params;
    }

    /**
     * 获取食用菌发菌模板日志
     * @param id  种植ID
     * @return  发菌日志
     */
    public static RequestParams getLogHairyFungusRecord(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getLogHairyFungusRecord.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 获取食用菌出菇模板日志
     * @param id  种植ID
     * @return  出菇日志
     */
    public static RequestParams getLogOutMushroomRecord(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getLogOutMushroomRecord.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 添加食用菌出菇记录
     * @param plantId 种植ID
     * @param temperature 温度
     * @param humidity 湿度
     * @param outMushroomTime 出菇日期
     * @param outMushroomCost 费用
     * @return 添加成败
     */
    public static RequestParams addLogHairyFungusRecord(String plantId, String temperature, String humidity, String outMushroomTime, String outMushroomCost, String weatherInfo) {
        RequestParams params = new RequestParams("mobileapi/plant/addLogOutMushroomRecord.json");
        params.setParam("plantId", plantId);
        params.setParam("temperature", temperature);
        params.setParam("humidity", humidity);
        params.setParam("outMushroomTime", outMushroomTime);
        params.setParam("outMushroomCost", outMushroomCost);
        params.setParam("weatherInfo", weatherInfo);
        return params;
    }

    /**
     * 添加食用菌病虫防治记录
     * @param plantId 种植id
     * @param symptom 症状
     * @param medicament 药剂
     * @param dosage 用量
     * @param preventionTime 食用菌病虫防治时间
     * @param preventionMethod 防治方法
     * @param pestPreventionCost 费用
     * @return 添加成败
     */
    public static RequestParams addLogPestPreventionRecord(String plantId, String symptom, String medicament, String dosage, String preventionTime, String preventionMethod, String pestPreventionCost, String weatherInfo) {
        RequestParams params = new RequestParams("mobileapi/plant/addLogPestPreventionRecord.json");
        params.setParam("plantId", plantId);
        params.setParam("symptom", symptom);
        params.setParam("medicament", medicament);
        params.setParam("dosage", dosage);
        params.setParam("preventionTime", preventionTime);
        params.setParam("preventionMethod", preventionMethod);
        params.setParam("pestPreventionCost", pestPreventionCost);
        params.setParam("weatherInfo", weatherInfo);
        return params;
    }

    /**
     * 获取食用菌出病虫防治板日志
     * @param id  种植ID
     * @return  病虫防治日志
     */
    public static RequestParams getLogPestPreventionRecord(String id) {
        RequestParams params = new RequestParams("mobileapi/plant/getLogPestPreventionRecord.json");
        params.setParam("id", id);
        return params;
    }

    /**
     * 发送获取验证码的短信
     * @param tel
     * @return
     */
    public static RequestParams getVerifyCodeToChangePwd(String tel){
        RequestParams params = new RequestParams("mobileapi/common/doSendForgotPwdSMSCode.json");
        params.setParam("tel",tel);
        return params;
    }

    /**
     * 修改密码
     * @param tel
     * @param code
     * @param pwd
     * @return
     */
    public static RequestParams doChangePwd(String tel, String code, String pwd){
        RequestParams params = new RequestParams("mobileapi/common/doChangePwd.json");
        params.setParam("tel",tel);
        params.setParam("code",code);
        params.setParam("pwd",pwd);
        return params;
    }

    /**
     * 取消我的接单-农工
     * @param requirementId
     * @param reason
     * @return
     */
    public static RequestParams cancelMyLaborOrder(String requirementId, String reason){
        RequestParams params = new RequestParams("mobileapi/basedata/cancelOrderLaborRequirementOrder.json");
        params.setParam("requirementId",requirementId);
        params.setParam("reason",reason);
        return params;
    }

    /**
     * 取消我的接单-农机
     * @param requirementId
     * @param reason
     * @return
     */
    public static RequestParams cancelMyMachineOrder(String requirementId, String reason){
        RequestParams params = new RequestParams("mobileapi/basedata/cancelOrderMachineRequirementOrder.json");
        params.setParam("requirementId",requirementId);
        params.setParam("reason",reason);
        return params;
    }

    /**
     * 获取支持地区
     * @return
     */
    public static RequestParams getDevelopedDistrict(){
        RequestParams params = new RequestParams("/mobileapi/common/getOpenAdstration.json");
        return params;
    }

    /**
     * 发送注册短信接口
     * @param tel 手机号码
     * @return
     */
    public static RequestParams getRegCodeParams(String tel) {
        RequestParams loginParams = new RequestParams("mobileapi/common/doSendRegSMSCode.json");
        loginParams.setParam("tel", tel);
        return loginParams;
    }

    /**
     * 注册接口
     * @param tel 手机号
     * @param name 昵称
     * @param code 验证码
     * @param pwd 密码
     * @param userType 用户类型
     * @param areaCode 地区码
     * @return
     */
    public static RequestParams getRegiParams(String tel, String name, String code, String pwd, String userType, String areaCode) {
        RequestParams params = new RequestParams("mobileapi/common/doRegistUser.json");
        params.setParam("tel", tel);
        params.setParam("name", name);
        params.setParam("code", code);
        params.setParam("pwd", pwd);
        params.setParam("userType", userType);
        params.setParam("areaCode", areaCode);
        return params;
    }
    /**
     * 加载收藏商品列表
     * @param pageNo
     * @param pageSize
     * @return
     */
    public static RequestParams getGoodsCollectList(String pageNo, String pageSize){
        RequestParams goodsCollectList = new RequestParams("mobileapi/agriculture/getGoodsCollectList.json");
        goodsCollectList.setParam("pageNo",pageNo);
        goodsCollectList.setParam("pageSize",pageSize);
        return goodsCollectList;
    }

    /**
     * 加载关注店铺列表
     * @return
     */
    public static RequestParams getStoreFollowList(){
        RequestParams storeFollowList = new RequestParams("mobileapi/agriculture/getStoreFollowList.json");
        return storeFollowList;
    }

    /**
     * 是否关注店铺
     * @param storeId
     * @param isFollow
     * @return
     */
    public static RequestParams isFollowStore(String storeId, String isFollow){
        RequestParams requestParams = new RequestParams("mobileapi/agriculture/isFollowStore.json");
        requestParams.setParam("storeId",storeId);
        requestParams.setParam("isFollow",isFollow);
        return requestParams;
    }

    /**
     * 是否收藏商品
     * @param goodId
     * @param isCollect
     * @return
     */
    public static RequestParams isCollectGood(String goodId, String isCollect){
        RequestParams requestParams = new RequestParams("mobileapi/agriculture/isCollectGood.json");
        requestParams.setParam("goodId",goodId);
        requestParams.setParam("isCollect",isCollect);
        return requestParams;
    }

    /**
     * 获取个人征信数据
     * @param pageNo
     * @param pageSize
     * @return
     */
    public static RequestParams getUserCredit(String pageNo, String pageSize){
        RequestParams requestParams = new RequestParams("mobileapi/common/getUserCredit.json");
        requestParams.setParam("pageNo",pageNo);
        requestParams.setParam("pageSize",pageSize);
        return requestParams;
    }

    /**
     * 申请专家
     * @param userId 用户ID
     * @param description 自我描述
     * @return
     */
    public static RequestParams applyExpert(String userId, String description){
        RequestParams requestParams = new RequestParams("mobileapi/experts/addApplyExpert.json");
        requestParams.setParam("userId",userId);
        requestParams.setParam("description",description);
        return requestParams;
    }

    /**
     * 查看申请专家的进度
     * @param userId 用户ID
     * @return
     */
    public static RequestParams lookApplyStatus(String userId){
        RequestParams requestParams = new RequestParams("mobileapi/experts/lookApplyStatus.json");
        requestParams.setParam("userId",userId);
        return requestParams;
    }

    /**
     * 获取首页推荐专家
     * @return
     */
    public static RequestParams getHomeExpert(){
        RequestParams requestParams = new RequestParams("mobileapi/experts/getHomeExpert.json");
        return requestParams;
    }


    /**
     * 资讯/学农技搜索查询
     * id为0时为全体搜索
     * @return
     */
    public static RequestParams doSearch(String categoryId, String keyWord, int pageNo, int pageSize){
        RequestParams requestParams = new RequestParams("/mobileapi/cms/queryQCms.json");
        requestParams.setParam("catalogCode",categoryId);
        requestParams.setParam("qTem",keyWord);
        requestParams.setParam("pageNo", String.valueOf(pageNo));
        requestParams.setParam("pageSize", String.valueOf(pageSize));
        return requestParams;
    }
}
